Skip to main content

Parking Prediction Melbourne CBD

·500 words·3 mins
LSTM Neural Network Deep Learning Classification PyTorch Machine Learning Python Django Leaflet GEO-Data Kafka Docker SQL Numpy Data Scientist Web-UI Vue.js JavaScript Git

In this project, an application was developed to predict the utilization of parking spaces in Melbourne’s central business district (CBD). The aim of the application is to use machine learning to predict the availability of parking spaces for different times of day. This should help drivers to find a parking space more efficiently. The prediction in Melbourne served as a proof of concept to demonstrate the general feasibility.

Data basis #

The prediction is based on a public data set that contains information on the occupancy of parking spaces in Melbourne over several years. For each parking space, there is detailed data on when it was occupied or free. This extensive history made it possible to develop a robust model that recognizes trends in parking space usage and can predict future occupancy.

Model: LSTM #

A Long Short-Term Memory (LSTM) network was used to predict parking lot occupancy. An LSTM is particularly suitable for modeling temporal dependencies in data, as it takes past states into account. The model was trained on the historical data and provides predictions of parking availability for three periods of the day:

  • morning
  • midday**
  • afternoon

Utilization is divided into three categories:

  1. High utilization
  2. Medium utilization
  3. Low utilization

These categories help users to better estimate how likely it is to find a parking space.

Web front end #

The forecast results are displayed in a user-friendly web frontend. The frontend has been equipped with a leaflet map view that visualizes the parking spaces in Melbourne CBD. When a parking space is selected, the application shows the occupancy of the selected parking space for the times of day (morning, noon, afternoon). The occupancy rate itself is then highlighted in color:

  • Red: High utilization
  • Yellow**: Medium utilization
  • Green**: Low utilization

Users can switch between the days on a timeline to see the forecasts for the respective day.

Backend #

The backend was developed with Django in Python to efficiently process the forecast results and deliver them to the frontend.

The backend communicated with the provided prediction model via Kafka. New prediction results are automatically recorded and communicated to the front end. Server Sent Events (SSE)** were used for the direct connection to the client to ensure real-time communication. This ensures that the forecasts are updated directly in the frontend without the website having to be reloaded.

Conclusion #

The developed application provides an effective solution to predict the utilization of parking spaces in Melbourne CBD. By using an LSTM model, a clear visual representation in the Leaflet map view and real-time communication via Kafka and server sent events, finding a parking space is made much easier. Drivers can view parking availability in real time and adjust their planning accordingly.

Activities #

  • Support in the development of the LSTM network to predict parking space utilization
  • Implementation of a web frontend, for visualization of predictions, using Vue.js, Vuetify, Django and Leaflet
  • Implementation of server sent events to continuously notify the client about new predictions
  • Implementation of a Python Kafka client for sending and reading Kafka messages